package com.hotel.customersystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.hotel.customersystem.pojo.CustomerUserCoupon;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (CustomerUserCoupon)表数据库访问层
 *
 * @author makejava
 * @since 2022-09-30 16:33:50
 */
@Mapper
public interface CustomerUserCouponMapper extends BaseMapper<CustomerUserCoupon> {
    // 根据couponNo修改优惠券使用状态为已使用 2
    Integer updateByCouponNo(@Param("couponNo") Integer couponNo);

    // 根据admin查询用户的优惠券记录
    List<CustomerUserCoupon> getUserAdmin(@Param("userAdmin") String userAdmin);

    //根据优惠券编号查询优惠券
    CustomerUserCoupon getByCouponNo(@Param("couponNo") String couponNo);
}

